<!DOCTYPE html>
<html lang="en-US">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="language" content="en" />
        <link href="./assets/ffd55088/css/bootstrap.css" rel="stylesheet">
<link href="./assets/5cf9384a/solarized_light.css" rel="stylesheet">
<link href="./assets/6c54116e/style.css" rel="stylesheet">
<script src="./assets/a44cef0f/jquery.js"></script>
<script src="./assets/ffd55088/js/bootstrap.js"></script>
<script src="./assets/8ac4e28a/jssearch.js"></script>    <title>Extension, yii\twig\Extension - Yii Framework 2.0 API Documentation</title>
</head>
<body>

<div class="wrap">
    <nav id="w10573" class="navbar-inverse navbar-fixed-top navbar" role="navigation"><div class="navbar-header"><button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#w10573-collapse"><span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span></button><a class="navbar-brand" href="./index.html">Yii Framework 2.0 API Documentation</a></div><div id="w10573-collapse" class="collapse navbar-collapse"><ul id="w10574" class="navbar-nav nav"><li><a href="./index.html">Class reference</a></li>
<li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown">Extensions <b class="caret"></b></a><ul id="w10575" class="dropdown-menu"><li><a href="./ext-apidoc-index.html" tabindex="-1">apidoc</a></li>
<li><a href="./ext-authclient-index.html" tabindex="-1">authclient</a></li>
<li><a href="./ext-bootstrap-index.html" tabindex="-1">bootstrap</a></li>
<li><a href="./ext-codeception-index.html" tabindex="-1">codeception</a></li>
<li><a href="./ext-debug-index.html" tabindex="-1">debug</a></li>
<li><a href="./ext-elasticsearch-index.html" tabindex="-1">elasticsearch</a></li>
<li><a href="./ext-faker-index.html" tabindex="-1">faker</a></li>
<li><a href="./ext-gii-index.html" tabindex="-1">gii</a></li>
<li><a href="./ext-imagine-index.html" tabindex="-1">imagine</a></li>
<li><a href="./ext-jui-index.html" tabindex="-1">jui</a></li>
<li><a href="./ext-mongodb-index.html" tabindex="-1">mongodb</a></li>
<li><a href="./ext-redis-index.html" tabindex="-1">redis</a></li>
<li><a href="./ext-smarty-index.html" tabindex="-1">smarty</a></li>
<li><a href="./ext-sphinx-index.html" tabindex="-1">sphinx</a></li>
<li><a href="./ext-swiftmailer-index.html" tabindex="-1">swiftmailer</a></li>
<li><a href="./ext-twig-index.html" tabindex="-1">twig</a></li></ul></li>
<li><a href="./guide-README.html">Guide</a></li></ul><div class="navbar-form navbar-left" role="search">
  <div class="form-group">
    <input id="searchbox" type="text" class="form-control" placeholder="Search">
  </div>
</div>
</div></nav>
    <div id="search-resultbox" style="display: none;" class="modal-content">
        <ul id="search-results">
        </ul>
    </div>

    
<div class="row">
    <div class="col-md-3">
                <div id="navigation" class="list-group"><a class="list-group-item active" href="#navigation-10572" data-toggle="collapse" data-parent="#navigation">yii\twig <b class="caret"></b></a><div id="navigation-10572" class="submenu panel-collapse collapse in"><a class="list-group-item active" href="./yii-twig-extension.html">Extension</a>
<a class="list-group-item" href="./yii-twig-optimizer.html">Optimizer</a>
<a class="list-group-item" href="./yii-twig-template.html">Template</a>
<a class="list-group-item" href="./yii-twig-viewrenderer.html">ViewRenderer</a>
<a class="list-group-item" href="./yii-twig-viewrendererstaticclassproxy.html">ViewRendererStaticClassProxy</a></div></div>    </div>
    <div class="col-md-9 api-content" role="main">
        <h1>Class yii\twig\Extension</h1>
<div class="top-nav">
    <a href="index.html">All Classes</a>
            | <a href="#properties">Properties</a>
                | <a href="#methods">Methods</a>
            </div>

<table class="summaryTable docClass table table-bordered">
    <colgroup>
        <col class="col-name" />
        <col class="col-value" />
    </colgroup>
            <tr><th>Inheritance</th><td><a href="yii-twig-extension.html">yii\twig\Extension</a> &raquo;
Twig_Extension</td></tr>
                                                <tr>
          <th>Source Code</th>
          <td><a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php">https://github.com/yiisoft/yii2-twig/blob/master/Extension.php</a></td>
        </tr>
    </table>

<div class="class-description">
    <p><strong>Extension provides Yii-specific syntax for Twig templates.</strong></p>
    
    </div>

<a id="properties"></a>

<div class="summary doc-property">
<h2>Protected Properties</h2>

<p><a href="#" class="toggle">Hide inherited properties</a></p>

<table class="summary-table table table-striped table-bordered table-hover">
<colgroup>
    <col class="col-property" />
    <col class="col-type" />
    <col class="col-description" />
    <col class="col-defined" />
</colgroup>
<tr>
  <th>Property</th><th>Type</th><th>Description</th><th>Defined By</th>
</tr>
        <tr id="$aliases">
        <td><a href="yii-twig-extension.html#$aliases-detail">$aliases</a></td>
        <td><a href="http://www.php.net/language.types.array">array</a></td>
        <td>Used class aliases</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="$namespaces">
        <td><a href="yii-twig-extension.html#$namespaces-detail">$namespaces</a></td>
        <td><a href="http://www.php.net/language.types.array">array</a></td>
        <td>Used namespaces</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="$widgets">
        <td><a href="yii-twig-extension.html#$widgets-detail">$widgets</a></td>
        <td><a href="http://www.php.net/language.types.array">array</a></td>
        <td>Used widgets</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
    </table>
</div>

<a id="methods"></a>

<div class="summary doc-method">
<h2>Public Methods</h2>

<p><a href="#" class="toggle">Hide inherited methods</a></p>

<table class="summary-table table table-striped table-bordered table-hover">
<colgroup>
    <col class="col-method" />
    <col class="col-description" />
    <col class="col-defined" />
</colgroup>
<tr>
  <th>Method</th><th>Description</th><th>Defined By</th>
</tr>
        <tr id="__construct()">
        <td><a href="yii-twig-extension.html#__construct()-detail">__construct()</a></td>
        <td>Creates new instance</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="addUses()">
        <td><a href="yii-twig-extension.html#addUses()-detail">addUses()</a></td>
        <td>Adds namespaces and aliases from constructor</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="beginWidget()">
        <td><a href="yii-twig-extension.html#beginWidget()-detail">beginWidget()</a></td>
        <td>Function for *_begin syntax support</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="call()">
        <td><a href="yii-twig-extension.html#call()-detail">call()</a></td>
        <td>Calls a method</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="endWidget()">
        <td><a href="yii-twig-extension.html#endWidget()-detail">endWidget()</a></td>
        <td>Function for *_end syntax support</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="getFunctions()">
        <td><a href="yii-twig-extension.html#getFunctions()-detail">getFunctions()</a></td>
        <td></td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="getName()">
        <td><a href="yii-twig-extension.html#getName()-detail">getName()</a></td>
        <td></td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="getNodeVisitors()">
        <td><a href="yii-twig-extension.html#getNodeVisitors()-detail">getNodeVisitors()</a></td>
        <td></td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="path()">
        <td><a href="yii-twig-extension.html#path()-detail">path()</a></td>
        <td>Generates relative URL</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="registerAsset()">
        <td><a href="yii-twig-extension.html#registerAsset()-detail">registerAsset()</a></td>
        <td>Function for registering an asset</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="registerAssetBundle()">
        <td><a href="yii-twig-extension.html#registerAssetBundle()-detail">registerAssetBundle()</a></td>
        <td>Function for additional syntax of registering asset bundles</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="resolveAndCall()">
        <td><a href="yii-twig-extension.html#resolveAndCall()-detail">resolveAndCall()</a></td>
        <td>Resolves a method from widget and asset syntax and calls it</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="resolveClassName()">
        <td><a href="yii-twig-extension.html#resolveClassName()-detail">resolveClassName()</a></td>
        <td>Resolves class name from widget and asset syntax</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="setProperty()">
        <td><a href="yii-twig-extension.html#setProperty()-detail">setProperty()</a></td>
        <td>Sets object property</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="url()">
        <td><a href="yii-twig-extension.html#url()-detail">url()</a></td>
        <td>Generates absolute URL</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="viewHelper()">
        <td><a href="yii-twig-extension.html#viewHelper()-detail">viewHelper()</a></td>
        <td>Used for 'begin_page', 'end_page', 'begin_body', 'end_body', 'head'</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
            <tr id="widget()">
        <td><a href="yii-twig-extension.html#widget()-detail">widget()</a></td>
        <td>Function for *_widget syntax support</td>
        <td><a href="yii-twig-extension.html">yii\twig\Extension</a></td>
    </tr>
    </table>
</div>

<a id="events"></a>

<a id="constants"></a>

<h2>Property Details</h2>

<div class="property-doc">

    <div class="detail-header h3" id="$aliases-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#$aliases-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L31" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L31" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $aliases        <span class="detail-header-tag small">
            protected                                                property
                    </span>
    </div>

    <div class="doc-description">
        <p>Used class aliases</p>

            </div>

    <div class="signature"><span class="signature-defs">protected</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <a href="yii-twig-extension.html#$aliases-detail">$aliases</a> <span style="color: #0000BB"></span><span style="color: #007700">=&nbsp;[]</span></div>


    <div class="detail-header h3" id="$namespaces-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#$namespaces-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L27" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L27" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $namespaces        <span class="detail-header-tag small">
            protected                                                property
                    </span>
    </div>

    <div class="doc-description">
        <p>Used namespaces</p>

            </div>

    <div class="signature"><span class="signature-defs">protected</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <a href="yii-twig-extension.html#$namespaces-detail">$namespaces</a> <span style="color: #0000BB"></span><span style="color: #007700">=&nbsp;[]</span></div>


    <div class="detail-header h3" id="$widgets-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#$widgets-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L35" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L35" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $widgets        <span class="detail-header-tag small">
            protected                                                property
                    </span>
    </div>

    <div class="doc-description">
        <p>Used widgets</p>

            </div>

    <div class="signature"><span class="signature-defs">protected</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <a href="yii-twig-extension.html#$widgets-detail">$widgets</a> <span style="color: #0000BB"></span><span style="color: #007700">=&nbsp;[]</span></div>

</div>
<h2>Method Details</h2>

<div class="method-doc">

    <div class="detail-header h3" id="__construct()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#__construct()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L43" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L43" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        __construct()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Creates new instance</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-twig-extension.html#__construct()-detail">__construct</a></strong> ( <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <span style="color: #0000BB">$uses&nbsp;</span><span style="color: #007700">=&nbsp;[]</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$uses</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Namespaces and classes to use in the template</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="addUses()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#addUses()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L253" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L253" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        addUses()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Adds namespaces and aliases from constructor</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-twig-extension.html#addUses()-detail">addUses</a></strong> ( <span style="color: #0000BB">$args</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$args</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Namespaces and classes to use in the template</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="beginWidget()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#beginWidget()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L142" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L142" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        beginWidget()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Function for *_begin syntax support</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">mixed</span> <strong><a href="yii-twig-extension.html#beginWidget()-detail">beginWidget</a></strong> ( <span style="color: #0000BB">$widget</span>, <span style="color: #0000BB">$config&nbsp;</span><span style="color: #007700">=&nbsp;[]</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$widget</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Widget name</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$config</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Widget config</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="call()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#call()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L217" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L217" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        call()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Calls a method</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">mixed</span> <strong><a href="yii-twig-extension.html#call()-detail">call</a></strong> ( <span style="color: #0000BB">$className</span>, <span style="color: #0000BB">$method</span>, <span style="color: #0000BB">$arguments&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$className</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Class name</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$method</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Method name</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$arguments</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="endWidget()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#endWidget()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L156" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L156" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        endWidget()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Function for *_end syntax support</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-twig-extension.html#endWidget()-detail">endWidget</a></strong> ( <span style="color: #0000BB">$widget&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$widget</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Widget name</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="getFunctions()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#getFunctions()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L61" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L61" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        getFunctions()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong></strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-twig-extension.html#getFunctions()-detail">getFunctions</a></strong> ( )</td></tr>
            </table>

<!--	-->

    <div class="detail-header h3" id="getName()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#getName()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L318" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L318" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        getName()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong></strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-twig-extension.html#getName()-detail">getName</a></strong> ( )</td></tr>
            </table>

<!--	-->

    <div class="detail-header h3" id="getNodeVisitors()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#getNodeVisitors()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L51" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L51" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        getNodeVisitors()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong></strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-twig-extension.html#getNodeVisitors()-detail">getNodeVisitors</a></strong> ( )</td></tr>
            </table>

<!--	-->

    <div class="detail-header h3" id="path()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#path()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L280" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L280" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        path()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Generates relative URL</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.string">string</a></span> <strong><a href="yii-twig-extension.html#path()-detail">path</a></strong> ( <span style="color: #0000BB">$path</span>, <span style="color: #0000BB">$args&nbsp;</span><span style="color: #007700">=&nbsp;[]</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$path</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The parameter to be used to generate a valid URL</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$args</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Arguments</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The generated relative URL</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="registerAsset()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#registerAsset()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L101" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L101" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        registerAsset()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Function for registering an asset</strong></p>

        <pre><code class="hljs twig"><span class="xml"></span><span class="hljs-variable">{{ use('yii/web/JqueryAsset') }}</span><span class="xml">
</span><span class="hljs-variable">{{ register_jquery_asset() }}</span><span class="xml">
</span></code></pre>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">mixed</span> <strong><a href="yii-twig-extension.html#registerAsset()-detail">registerAsset</a></strong> ( <span style="color: #0000BB">$context</span>, <span style="color: #0000BB">$asset</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$context</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Context information</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$asset</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Asset name</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="registerAssetBundle()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#registerAssetBundle()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L122" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L122" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        registerAssetBundle()
        <span class="detail-header-tag small">
            public                                    method
                            (available since version 2.0.4)
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Function for additional syntax of registering asset bundles</strong></p>

        <pre><code class="hljs bash">{{ register_asset_bundle(<span class="hljs-string">'yii/web/JqueryAsset'</span>) }}
</code></pre>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void|<a href="yii-web-assetbundle.html">yii\web\AssetBundle</a></span> <strong><a href="yii-twig-extension.html#registerAssetBundle()-detail">registerAssetBundle</a></strong> ( <span style="color: #0000BB">$context</span>, <span style="color: #0000BB">$bundle</span>, <span style="color: #0000BB">$return&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$context</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Context information</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$bundle</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Asset bundle class fully qualified name</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$return</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Indicates if AssetBundle should be returned</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="resolveAndCall()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#resolveAndCall()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L204" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L204" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        resolveAndCall()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Resolves a method from widget and asset syntax and calls it</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">mixed</span> <strong><a href="yii-twig-extension.html#resolveAndCall()-detail">resolveAndCall</a></strong> ( <span style="color: #0000BB">$className</span>, <span style="color: #0000BB">$method</span>, <span style="color: #0000BB">$arguments&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$className</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Class name</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$method</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Method name</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$arguments</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="resolveClassName()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#resolveClassName()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L233" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L233" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        resolveClassName()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Resolves class name from widget and asset syntax</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.string">string</a></span> <strong><a href="yii-twig-extension.html#resolveClassName()-detail">resolveClassName</a></strong> ( <span style="color: #0000BB">$className</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$className</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Class name</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="setProperty()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#setProperty()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L310" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L310" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        setProperty()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Sets object property</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-twig-extension.html#setProperty()-detail">setProperty</a></strong> ( <span style="color: #0000BB">$object</span>, <span style="color: #0000BB">$property</span>, <span style="color: #0000BB">$value</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$object</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/class.stdclass">stdClass</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$property</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$value</span></td>
                  <td class="param-type-col">mixed</td>
                  <td class="param-desc-col"></td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="url()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#url()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L295" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L295" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        url()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Generates absolute URL</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.string">string</a></span> <strong><a href="yii-twig-extension.html#url()-detail">url</a></strong> ( <span style="color: #0000BB">$path</span>, <span style="color: #0000BB">$args&nbsp;</span><span style="color: #007700">=&nbsp;[]</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$path</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The parameter to be used to generate a valid URL</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$args</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Arguments</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The generated absolute URL</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="viewHelper()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#viewHelper()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L189" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L189" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        viewHelper()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Used for 'begin_page', 'end_page', 'begin_body', 'end_body', 'head'</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-twig-extension.html#viewHelper()-detail">viewHelper</a></strong> ( <span style="color: #0000BB">$context</span>, <span style="color: #0000BB">$name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$context</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Context information</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$name</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="widget()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-twig-extension.html#widget()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-twig/edit/master/Extension.php#L176" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-twig/blob/master/Extension.php#L176" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        widget()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Function for *_widget syntax support</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">mixed</span> <strong><a href="yii-twig-extension.html#widget()-detail">widget</a></strong> ( <span style="color: #0000BB">$widget</span>, <span style="color: #0000BB">$config&nbsp;</span><span style="color: #007700">=&nbsp;[]</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$widget</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Widget name</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$config</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Widget config</p>
</td>
                </tr>
                                                </table>

<!--	-->
</div>
        </div>
</div>

<script type="text/javascript">
    /*<![CDATA[*/
    $("a.toggle").on('click', function () {
        var $this = $(this);
        if ($this.hasClass('properties-hidden')) {
            $this.text($this.text().replace(/Show/,'Hide'));
            $this.parents(".summary").find(".inherited").show();
            $this.removeClass('properties-hidden');
        } else {
            $this.text($this.text().replace(/Hide/,'Show'));
            $this.parents(".summary").find(".inherited").hide();
            $this.addClass('properties-hidden');
        }

        return false;
    });
    /*
     $(".sourceCode a.show").toggle(function () {
     $(this).text($(this).text().replace(/show/,'hide'));
     $(this).parents(".sourceCode").find("div.code").show();
     },function () {
     $(this).text($(this).text().replace(/hide/,'show'));
     $(this).parents(".sourceCode").find("div.code").hide();
     });
     $("a.sourceLink").click(function () {
     $(this).attr('target','_blank');
     });
     */
    /*]]>*/
</script>


</div>

<footer class="footer">
        <p class="pull-right"><small>Page generated on Sat, 09 Jul 2016 12:15:51 +0000</small></p>
    Powered by <a href="http://www.yiiframework.com/" rel="external">Yii Framework</a></footer>

<script type="text/javascript">jQuery(document).ready(function () {
    var shiftWindow = function () { scrollBy(0, -50) };
    if (location.hash) setTimeout(shiftWindow, 1);
    window.addEventListener("hashchange", shiftWindow);
var element = document.createElement("script");
element.src = "./jssearch.index.js";
document.body.appendChild(element);

var searchBox = $('#searchbox');

// search when typing in search field
searchBox.on("keyup", function(event) {
    var query = $(this).val();

    if (query == '' || event.which == 27) {
        $('#search-resultbox').hide();
        return;
    } else if (event.which == 13) {
        var selectedLink = $('#search-resultbox a.selected');
        if (selectedLink.length != 0) {
            document.location = selectedLink.attr('href');
            return;
        }
    } else if (event.which == 38 || event.which == 40) {
        $('#search-resultbox').show();

        var selected = $('#search-resultbox a.selected');
        if (selected.length == 0) {
            $('#search-results').find('a').first().addClass('selected');
        } else {
            var next;
            if (event.which == 40) {
                next = selected.parent().next().find('a').first();
            } else {
                next = selected.parent().prev().find('a').first();
            }
            if (next.length != 0) {
                var resultbox = $('#search-results');
                var position = next.position();

//              TODO scrolling is buggy and jumps around
//                resultbox.scrollTop(Math.floor(position.top));
//                console.log(position.top);

                selected.removeClass('selected');
                next.addClass('selected');
            }
        }

        return;
    }
    $('#search-resultbox').show();
    $('#search-results').html('<li><span class="no-results">No results</span></li>');

    var result = jssearch.search(query);

    if (result.length > 0) {
        var i = 0;
        var resHtml = '';

        for (var key in result) {
            if (i++ > 20) {
                break;
            }
            resHtml = resHtml +
            '<li><a href="' + result[key].file.u.substr(3) +'"><span class="title">' + result[key].file.t + '</span>' +
            '<span class="description">' + result[key].file.d + '</span></a></li>';
        }
        $('#search-results').html(resHtml);
    }
});

// hide the search results on ESC
$(document).on("keyup", function(event) { if (event.which == 27) { $('#search-resultbox').hide(); } });
// hide search results on click to document
$(document).bind('click', function (e) { $('#search-resultbox').hide(); });
// except the following:
searchBox.bind('click', function(e) { e.stopPropagation(); });
$('#search-resultbox').bind('click', function(e) { e.stopPropagation(); });

});</script></body>
</html>
